package alibaba.threadlocal.demo01;

import lombok.extern.slf4j.Slf4j;

/**
 * @author ChangLiang
 * @date 2020/4/20
 */
@Slf4j
public class Level {
    static void checkLevel() {
        User currentUser = UserContext.getCurrentUser();
        if (currentUser.getLevel() > 100) {
            log.info(currentUser.getName() + " is a VIP user");
        } else {
            log.info(currentUser.getName() + " is a registered user");
        }
    }
}
